/* newmoon main.h
 * Created: Feb 14 2009 by HyperHacker and Smallhacker
 * Last release: none
 * Purpose: Super Mario World level editor
 * Runs on: Linux, hopefully Windows too
 * 
 * Todo:
 * -Some extended objects' sizes are calculated when they're decoded. They
 *  should probably be calculated in CalculateSize() instead (which also needs
 *  to be renamed), unless we can be sure we won't need to know the size before
 *  decoding. Might also define the sizes in a table file.
 * -Figure out how animated tiles are copied from GFX33 instead of hardcoding.
 * -Something needs to be fixed in the makefile; dependencies are not being
 *  handled correctly. Changes to some structs/classes do not trigger files that
 *  use them to be recompiled.
 * -Finish palette loading.
 * -Decode all objects correctly. (Some entries in ExtObjMap16 are wrong?)
 *  -Some extended objects' sizes are not 1x1; set them properly
 * -Figure out how to adjust compiler padding, so unions work properly.
 * -More/better exception handling.
 * -Implement menu.
 * -Should rename "Tileset decoding logic" to "Object set"
 * -Other operators in SNESPointer
 * -Fill in levelnames.txt
 * -Support vertical levels.
 * -Display background images and layer 2.
 * -Display object information on mouseover.
 * -Display layer 3.
 * -Handle pipe colours.
 * -Read parameters from ROM, so that it works properly when those parameters
 *  have been changed. (i.e. any hardcoded values in code that mimics the game
 *  code should be read from that code.)
 * -Music seems to be wrong in header. Maybe the list in LM is not in the order
 *  of the values in ROM?
 * -Implement file selector.
 */
 
#ifndef __newmoon_main_h
#define __newmoon_main_h

//Macros and defines
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS //for inttypes.h to actually do anything useful
#endif

//Library includes
#include <string>
#include <vector>
#include <dirent.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <inttypes.h> //64-bit printf macros
#include <stdio.h>
#include <stdlib.h>
#include <string.h> //strcpy
#include <sys/stat.h>
#include <unistd.h>

//Shared header includes
#include "debugout.h"
#include "compat.h"
#include "mathx.h"
#include "uint.h"

#include "gui/cDrawBox.h"
#include "gui/cMainWindow.h"
#include "cLevel.h"

//Function prototypes - main.cpp
int main(int argc, char** argv);
void LevelBoxMouseButton(DrawBox* Box, GtkWidget* DrawingArea, GdkEventButton* Event, bool Press);
void LevelBoxMouseMove(DrawBox* Box, GtkWidget* DrawingArea, GdkEventMotion* Event, u32 X, u32 Y, GdkModifierType State);
void LevelBoxConfigureEvent(DrawBox* Box, GtkWidget* DrawingArea, GdkEventConfigure* Event);
void LevelBoxExposeEvent(DrawBox* Box, GtkWidget* DrawingArea, GdkEventExpose* Event);
gboolean MainWindowClosed(GtkWidget *Widget, GdkEvent *Event, gpointer Dummy);
void onexit();

#endif //__newmoon_main_h
